import moment from "moment";
import { CurrencyTypes,PayChannel,TradeTypes } from '../../../utils/constant.js'

const LogisticPriceSearchKeys = [
    {
        key: "regionCname",
        label: "区域中文名",
        placeholder: "请选择区域中文名",
        select: true,
        rules: [{
            required: false
        }],
    },
    {
        key: "levelCname",
        label: "物流等级",
        placeholder: "请选择物流等级",
        select: true,
        rules: [{
            required: false
        }],
    },
    {
        key: "version",
        label: "物流模板",
        placeholder: "请选择物流模板",
        select: true,
        rules: [{
            required: false
        }],
    },
]
const LogisticPriceColumn =[
    { title: 'ID', align: 'center', dataIndex:'id' }, 
    { title: '物流模板', align: 'center', dataIndex: 'tmplName' }, 
    { title: '物流模板中文名', align: 'center', dataIndex: 'tmplCname' }, 
    { title: '区域中文名', align: 'center', dataIndex:'regionCname' }, 
    { title: '物流等级', align: 'center', dataIndex:'levelCname' }, 
    // { title: '黑白名单', align: 'center', dataIndex:'allowArrearage', customRender: text => { return text ==1?'允许': '不允许' }}, 
    // { title: 'SKU', align: 'center', dataIndex: 'skuCode'}, 
    // { title: 'SPU', align: 'center', dataIndex: 'spuCode'}, 
    { title: '首件价格', align: 'center', dataIndex: 'firstPrice'}, 
    { title: '增件价格', align: 'center', dataIndex: 'secondPrice'}, 
    // { title: '首件总价', align: 'center', dataIndex: 'firstTotalPrice'}, 
    // { title: '增件总价', align: 'center', dataIndex: 'secondTotalPrice'}, 
    { title: '版本号', align: 'center', dataIndex: 'version'}, 
    { title: '重量', align: 'center', dataIndex: 'weight'}, 
    { title: '创建时间', align: 'center', dataIndex:'createTime', customRender:text =>{return moment(text).format('YYYY-MM-DD hh:mm:ss')} },
]

const LogisticProductSearchKeys = [
    {
        key: "regionCode",
        label: "区域中文名",
        placeholder: "请选择区域中文名",
        select: true,
        rules: [{
            required: false
        }],
    },
    {
        key: "tmplCode",
        label: "物流等级",
        placeholder: "请选择物流等级",
        select: true,
        rules: [{
            required: false
        }],
    },
    {
        key: "spuCode",
        label: "SPU",
        placeholder: "请输入",
        input: true,
        rules: [{
            required: false
        }],
    },
    {
        key: "skuCode",
        label: "SKU",
        placeholder: "请输入",
        input: true,
        rules: [{
            required: false
        }],
    },
]
const LogisticProductColumn =[
    { title: '物流模板', width:100, align: 'center', dataIndex: 'tmplName' }, 
    { title: '区域中文名', width:110, align: 'center', dataIndex:'regionCname' }, 
    { title: '物流等级中文名', width:80, align: 'center', dataIndex:'levelCname' }, 
    // { title: '黑白名单', width:100, align: 'center', dataIndex:'allowArrearage', customRender: text => { return text ==1?'允许': '不允许' }}, 
    // { title: '商品名称', width:100, align: 'center', dataIndex: 'skuCode'}, 
    { title: 'SPU', width:100, align: 'center', dataIndex: 'spuCode'}, 
    { title: 'SKU', width:100, align: 'center', dataIndex: 'skuCode'}, 
    { title: '商品线下价格($)', width:80, align: 'center', dataIndex: 'offlinePrice'},
    { title: '首件价格($)', width:100, align: 'center', dataIndex: 'firstPrice'}, 
    { title: '增件价格($)', width:100, align: 'center', dataIndex: 'secondPrice'}, 
    { title: '首件总价($)', width:100, align: 'center', dataIndex: 'firstTotalPrice'}, 
    { title: '次件总价($)', width:100, align: 'center', dataIndex: 'secondTotalPrice'}, 
    { title: '版本号', width:80, align: 'center', dataIndex: 'version'}, 
    { title: '美元汇率',  width:100,align: 'center', dataIndex: 'usdRate'}, 
    // { title: '商品图片链接',  width:130,align: 'center', dataIndex: 'version'}, 
]

export {
    LogisticPriceSearchKeys, LogisticPriceColumn,
    LogisticProductSearchKeys, LogisticProductColumn
}